#include<stdio.h>
#include<string.h>
int main(int argc,char*argv[]){
	char a[41];
	int i;
	scanf("%s",a);
	for(i=0;i<strlen(a);i++){
		if(a[i]==40&&a[i+1]==45){
				printf("%c\n%c",a[i],a[i+1]);i=i+2;
			}
		
			for(;a[i]>47&&a[i]<58;i++){
			   if((a[i+1]>57||a[i+1]<48)&&a[i+1]!=NULL){
			    printf("%c\n",a[i]);
			   }else{
			    printf("%c",a[i]);
			   }
			}
			
		
		if(i==strlen(a)-1||a[i]==NULL){
			if(a[i]!=NULL){
		    printf("%c",a[i]);
			}
		}
		else{
			printf("%c\n",a[i]);
		}
	}
	return 0;
}
